﻿/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 08/08/2017
 * Time: 09:06
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace ProxyEditor
{
	/// <summary>
	/// Description of ProxyObj.
	/// </summary>
	public class ProxyObj:INotifyPropertyChanged{
		private string proxyIP=String.Empty;
		private string proxyPort=String.Empty;
		private Boolean enabled = false;
		
		public string ProxyIP{
			get{
				return proxyIP;
			}
			set{
				if(value!=this.proxyIP){
					this.proxyIP=value;
					NotifyPropertyChanged();
				}
			}
		}
		public string ProxyPort { 
			get{
				return proxyPort;
			}
			set{
				if(value!=this.proxyIP){
					this.proxyPort=value;
					NotifyPropertyChanged();
				}
			}
		}
		
		public Boolean Enabled {
			get{
				return enabled;
			}
			set{
				if(value!=this.enabled){
					this.enabled=value;
					NotifyPropertyChanged();
				}
			}			
		}

		#region INotifyPropertyChanged implementation

		public event PropertyChangedEventHandler PropertyChanged;
		
		 private void NotifyPropertyChanged(
			[CallerMemberName]
			String propertyName = "")
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

		#endregion
	}
}
